<template>
    <p></p>
    <nut-button type="primary" @click="linkToDetail()">点击跳转到xx页面</nut-button>
    <nut-button type="primary" @click="linkToTab()">点击跳转到tab页面</nut-button>
</template>

<script setup>
import Taro from '@tarojs/taro'

const linkToDetail = () => {
    console.log('跳转')
    // Taro.navigateTo({
    //     url: `/pages/product/detail/index?id=${product.id}`
    // })
}
const linkToTab = () => {
    console.log('跳转')
    Taro.switchTab({
        url: '/pages/index/index'
    })
}
</script>
